package com.xiaotu.spider.maoyan.pipeline;


import org.springframework.stereotype.Component;

import com.xiaotu.common.model.MaoYanScoreSupplement;
import com.xiaotu.spider.APipeline;

import us.codecraft.webmagic.ResultItems;
import us.codecraft.webmagic.Task;
@Component("MaoYanMovieScoreSupplementPipeline")
public class MaoYanMovieScoreSupplementPipeline extends APipeline{

	@Override
	protected void doProcess(ResultItems resultItems, Task task) {
        
		MaoYanScoreSupplement obj = resultItems.get(MaoYanScoreSupplement.class.getName());
        if(null!=obj){
        	String key = "SCORE_SUPPLEMENT";
        	cacheHandler.hSet(key, obj.getDataid(), obj);
        	cacheHandler.setCacheTimeout(key);
        }
        
	}
	
}
